#!/bin/bash
make docker
sleep 180;
curl  --silent -k -H "Content-Type: application/json"  -X POST -d  '{"email":"admin@fp.com","password":"222222"}' https://cloud-docker.connectedpdf.com/api/auth/access_token
if [ $? -eq 0 ]; then
 echo "beginning push docker images"
  docker push repo.connectedpdf.com:5000/ucx/puppetdone:`date +%Y%m%d`
  docker push repo.connectedpdf.com:5000/ucx/puppetdone
 else
 echo "please check docker images"
 exit 1
fi
